package cate.common.table.trademall.dailyres;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import easy.java.dev.note.NoteField;

public class DailyResGiftRow extends ERow {
    @NoteField(value = "消耗类型", detail = "0免费 1消耗资源物品 2直购")
    public int costType;
    @NoteField(value = "直购价格")
    public int costRmb;
    @NoteField(value = "购买消耗")
    public String costStr;
    @NoteField(value = "返还积分")
    public String pointStr;
    @NoteField(value = "重置类型", detail = "0从不重置 1日重置 2周重置 3月重置")
    public int resetType;
    @NoteField(value = "限购数量", detail = "0不限购")
    public int buyLimit;
    @NoteField(value = "VIP限购")
    public int vipLimit;
    @NoteField(value = "奖励物品")
    public String rewardStr;
    @NoteField(value = "开服开启天数")
    public int dayStart;
    @NoteField(value = "开服结束天数")
    public int dayEnd;

    @NoteField(value = "商品名称")
    public String itemName;


    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        id = xrw.getInteger("ID");
        costType = xrw.getInteger("消耗类型", -1);
        costRmb = xrw.getInteger("直购价格", 0);
        pointStr = xrw.getString("返还积分", "");
        costStr = xrw.getString("购买消耗", "");
        resetType = xrw.getInteger("重置类型", 0);
        buyLimit = xrw.getInteger("限购数量", 0);
        vipLimit = xrw.getInteger("VIP限购", 0);
        rewardStr = xrw.getString("奖励物品");
        dayStart = xrw.getInteger("开服开启天数", 0);
        dayEnd = xrw.getInteger("开服结束天数", 999);

        itemName = xrw.getString("商品名称");
    }
}
